Determine if two value are equal with the == operator. Notice the 2 = characters.
def equal(val1, val2):
result = val1 == val2
return result
Function Call | Return Value | |||
---|---|---|---|---|
equal(6, 6) | → | |||
equal(12, 12) | → | |||
equal(8, 7) | → | |||
equal(12, 24) | → | |||
equal(7, 7) | → |
Experiment with this code on Gitpod.io